<<<<<<< HEAD
<template>
  <div>
    <div class="head">
      <h2>
        <router-link to="/fristweb">小U到家站点服务台</router-link>
      </h2>
      <ul>
        <li>{{ admin_name }}</li>
        <li id="tuichu" @click="tuichu">退出登录</li>
        <li @click="pwdVisible = true">修改密码</li>
      </ul>
    </div>
    <!-- 弹出框 -->
    <el-dialog
      class="psyModle"
      title="修改密码"
      :visible.sync="pwdVisible"
      width="37%"
      top="50px"
      center
    >
      <span class="psChaXunSpan">请输入旧密码 </span
      ><el-input
        class="searchs"
        type="text"
        placeholder="请输入旧密码"
        v-model="oldPassword"
      ></el-input>
      <span class="psChaXunSpan">请输入新密码 </span
      ><el-input
        class="searchs"
        type="text"
        placeholder="请输入新密码"
        v-model="newPassword"
      ></el-input>
      <span class="psChaXunSpan">再输入新密码 </span
      ><el-input
        class="searchs"
        type="text"
        placeholder="再输入新密码"
        v-model="newPassword1"
      ></el-input>
      <span slot="footer" class="dialog-footer">
        <el-button @click="pwdVisible = false">取 消</el-button>
        <el-button
          type="primary"
          @click="
            pwdVisible = false;
            updatapwd();
          "
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <div class="home">
      <el-container class="home-container">
        <el-aside width="200px" class="aside">
          <el-menu>
            <el-submenu index="1">
              <template slot="title"
                ><i class="el-icon-location-outline"></i>
                <router-link to="/zhandian">站点管理</router-link>
              </template>
              <el-menu-item index="1-1"
                ><i class="el-icon-office-building"></i>
                <router-link to="/zhandianzhanghao">站点账号管理</router-link>
              </el-menu-item>
            </el-submenu>
            <el-menu-item index="2"
              ><i class="el-icon-user"></i>
              <router-link to="/peisongyuan">配送员管理</router-link>
            </el-menu-item>
            <el-menu-item index="3"
              ><i class="el-icon-mobile-phone"></i>
              <router-link to="/yonghu">用户管理</router-link>
            </el-menu-item>
            <el-menu-item index="4"
              ><i class="el-icon-truck"></i>
              <router-link to="/paisongdingdan">派送订单管理</router-link>
            </el-menu-item>
            <el-menu-item index="5"
              ><i class="el-icon-goods"></i>
              <router-link to="/shangpin">商品品类管理</router-link>
            </el-menu-item>
            <el-submenu index="6">
              <template slot="title"
                ><i class="el-icon-box"></i>
                <router-link to="/wuliao">物料管理</router-link>
              </template>
              <el-menu-item index="6-1"
                ><i class="el-icon-document"></i>
                <router-link to="/wuliaotongji">物料统计</router-link>
              </el-menu-item>
            </el-submenu>
            <el-submenu index="7">
              <template slot="title"
                ><i class="el-icon-paperclip"></i>
                <router-link to="/xitong">系统管理</router-link>
              </template>
              <el-menu-item index="7-1"
                ><i class="el-icon-service"></i>
                <router-link to="/jueseguanli">角色管理</router-link>
              </el-menu-item>
            </el-submenu>
            <el-menu-item index="8"
              ><i class="el-icon-setting"></i>
              <router-link to="/shezhi">设置</router-link>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <router-view> </router-view>
      </el-container>
    </div>
  </div>
</template>
<script>
export default {
  name: "HomeView",
  components: {
    // HelloWorld
    // Mainright,
  },
  data() {
    return {
      admin_name: "",
      oldPassword: "",
      newPassword: "",
      newPassword1: "",
      pwdVisible: false,
      allzhandian: [],
      allzhandianArr: [], //
    };
  },
  mounted() {
    this.admin_name = window.localStorage.getItem("name");
    // console.log(this.$route.query);
    this.allsite();
  },
  methods: {
    allsite() {
      this.$axios({
        method: "post",
        url: "/xiaoucomeshome_war/admin/selectSiteName",
      }).then((response) => {
        this.allzhandian = response.data.data;
        this.allzhandian.forEach((element) => {
          this.allzhandianArr.push({ value: element.site_id, label: element.site_name });
        });
        window.localStorage.setItem("allzhandianArr", JSON.stringify(this.allzhandianArr));
      });
    },
    tuichu() {
      window.localStorage.clear();
      this.$router.push({ path: "/mainlogin" });
    },
    updatapwd() {
      this.$axios({
        method: "post",
        url: "/xiaoucomeshome_war/admin/updatePwd",
        data: {
          adminId: window.localStorage.getItem("admin_id"),
          oldPassword: this.oldPassword,
          newPassword: this.newPassword,
          newPassword1: this.newPassword1,
        },
      })
        .then((response) => {
          // console.log(response);
        })
        .catch((error) => {
          console.log(error);
        });
    },
  },
};
</script>
<style lang="less" scoped>
// .el-container {
//   height: 100%;
// }
.aside {
  background-color: #ececec;
}
.el-menu {
  background-color: #ececec;
}
.home-container {
  height: 750px;
  border: 1px solid #eee;
}
.psChaXunSpan {
  width: 20%;
  display: inline-block;
  margin: 5px 2%;
  text-align-last: justify;
}
.searchs {
  margin: 5px 2%;
  width: 68%;
}
.search {
  margin: 10px 40px 0 20px;
  width: 20%;
}
.head {
  width: 100%;
  height: 120px;
  text-align: center;
  background-color: rgba(6, 6, 6, 0.1);

  h2 {
    line-height: 120px;
    margin: 0;
    color: #7f7f7f;
  }

  overflow: hidden;
  position: relative;

  ul {
    position: absolute;
    right: 100px;
    bottom: 10px;
    z-index: 2;
    float: right;

    li {
      list-style: none;
      float: left;
      padding: 3px 10px;
      cursor: pointer;
    }

    #tuichu {
      border-left: 1px solid black;
      border-right: 1px solid black;
    }
  }
}

.router-link-exact-active {
  color: #000;
}
</style>
=======
<template>
  <div>
    <div class="head">
      <h2>
        <router-link to="/fristweb">小U到家站点服务台</router-link>
      </h2>
      <ul>
        <li>{{ admin_name }}</li>
        <li id="tuichu" @click="tuichu">退出登录</li>
        <li @click="pwdVisible = true">修改密码</li>
      </ul>
    </div>
    <!-- 弹出框 -->
    <el-dialog
      class="psyModle"
      title="修改密码"
      :visible.sync="pwdVisible"
      width="37%"
      top="50px"
      center
    >
      <span class="psChaXunSpan">请输入旧密码 </span
      ><el-input
        class="searchs"
        type="text"
        placeholder="请输入旧密码"
        v-model="oldPassword"
      ></el-input>
      <span class="psChaXunSpan">请输入新密码 </span
      ><el-input
        class="searchs"
        type="text"
        placeholder="请输入新密码"
        v-model="newPassword"
      ></el-input>
      <span class="psChaXunSpan">再输入新密码 </span
      ><el-input
        class="searchs"
        type="text"
        placeholder="再输入新密码"
        v-model="newPassword1"
      ></el-input>
      <span slot="footer" class="dialog-footer">
        <el-button @click="pwdVisible = false">取 消</el-button>
        <el-button
          type="primary"
          @click="
            pwdVisible = false;
            updatapwd();
          "
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <div class="home">
      <el-container class="home-container">
        <el-aside width="200px" class="aside">
          <el-menu>
            <el-submenu index="1">
              <template slot="title"
                ><i class="el-icon-location-outline"></i>
                <router-link to="/zhandian">站点管理</router-link>
              </template>
              <el-menu-item index="1-1"
                ><i class="el-icon-office-building"></i>
                <router-link to="/zhandianzhanghao">站点账号管理</router-link>
              </el-menu-item>
            </el-submenu>
            <el-menu-item index="2"
              ><i class="el-icon-user"></i>
              <router-link to="/peisongyuan">配送员管理</router-link>
            </el-menu-item>
            <el-menu-item index="3"
              ><i class="el-icon-mobile-phone"></i>
              <router-link to="/yonghu">用户管理</router-link>
            </el-menu-item>
            <el-menu-item index="4"
              ><i class="el-icon-truck"></i>
              <router-link to="/paisongdingdan">派送订单管理</router-link>
            </el-menu-item>
            <el-menu-item index="5"
              ><i class="el-icon-goods"></i>
              <router-link to="/shangpin">商品品类管理</router-link>
            </el-menu-item>
            <el-submenu index="6">
              <template slot="title"
                ><i class="el-icon-box"></i>
                <router-link to="/wuliao">物料管理</router-link>
              </template>
              <el-menu-item index="6-1"
                ><i class="el-icon-document"></i>
                <router-link to="/wuliaotongji">物料统计</router-link>
              </el-menu-item>
            </el-submenu>
            <el-submenu index="7">
              <template slot="title"
                ><i class="el-icon-paperclip"></i>
                <router-link to="/xitong">系统管理</router-link>
              </template>
              <el-menu-item index="7-1"
                ><i class="el-icon-service"></i>
                <router-link to="/jueseguanli">角色管理</router-link>
              </el-menu-item>
            </el-submenu>
            <el-menu-item index="8"
              ><i class="el-icon-setting"></i>
              <router-link to="/shezhi">设置</router-link>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <router-view> </router-view>
      </el-container>
    </div>
  </div>
</template>
<script>
export default {
  name: "HomeView",
  components: {
    // HelloWorld
    // Mainright,
  },
  data() {
    return {
      admin_name: "",
      oldPassword: "",
      newPassword: "",
      newPassword1: "",
      pwdVisible: false,
      allzhandian: [],
      allzhandianArr: [], //
    };
  },
  mounted() {
    this.admin_name = window.localStorage.getItem("name");
    // console.log(this.$route.query);
    this.allsite();
  },
  methods: {
    allsite() {
      this.$axios({
        method: "post",
        url: "/xiaoucomeshome_war/admin/selectSiteName",
      }).then((response) => {
        this.allzhandian = response.data.data;
        this.allzhandian.forEach((element) => {
          this.allzhandianArr.push({ value: element.site_id, label: element.site_name });
        });
        window.localStorage.setItem("allzhandianArr", JSON.stringify(this.allzhandianArr));
      });
    },
    tuichu() {
      window.localStorage.clear();
      this.$router.push({ path: "/mainlogin" });
    },
    updatapwd() {
      this.$axios({
        method: "post",
        url: "/xiaoucomeshome_war/admin/updatePwd",
        data: {
          adminId: window.localStorage.getItem("admin_id"),
          oldPassword: this.oldPassword,
          newPassword: this.newPassword,
          newPassword1: this.newPassword1,
        },
      })
        .then((response) => {
          // console.log(response);
        })
        .catch((error) => {
          console.log(error);
        });
    },
  },
};
</script>
<style lang="less" scoped>
// .el-container {
//   height: 100%;
// }
.aside {
  background-color: #ececec;
}
.el-menu {
  background-color: #ececec;
}
.home-container {
  height: 750px;
  border: 1px solid #eee;
}
.psChaXunSpan {
  width: 20%;
  display: inline-block;
  margin: 5px 2%;
  text-align-last: justify;
}
.searchs {
  margin: 5px 2%;
  width: 68%;
}
.search {
  margin: 10px 40px 0 20px;
  width: 20%;
}
.head {
  width: 100%;
  height: 120px;
  text-align: center;
  background-color: rgba(6, 6, 6, 0.1);

  h2 {
    line-height: 120px;
    margin: 0;
    color: #7f7f7f;
  }

  overflow: hidden;
  position: relative;

  ul {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
    float: right;

    li {
      list-style: none;
      float: left;
      padding: 3px 10px;
      cursor: pointer;
    }

    #tuichu {
      border-left: 1px solid black;
      border-right: 1px solid black;
    }
  }
}

.router-link-exact-active {
  color: #000;
}
</style>
>>>>>>> ae27e4fe2d4f939d0b0ee2bfa506b9e3269c53cb
